"""
 输入一个字符串,返回满足以下条件的字符串
 ■ 由字符串的最前面两个字母和最后两个字 母组成的字符串。
 ■ 例如： 'spring' 返回 'spng'， 'is' 返回 'is’
 ■ 当输入的字符串长度小于2时，返回空字 符串
"""
def testS(s):
    sLength = len(s)
    if (sLength < 2):
        return ""
    elif (sLength == 2):
        return s
    else:
        s1 = s[0:2]
        s2 = s[-2: sLength]
        return s1 + s2

s = input()
r = testS(s)
print(r)

#测试通过
#答案：
"""
   "source": [
    "s=input('input a string:')\n",
    "if int(len(s))<2:\n",
    "    print(' ')\n",
    "elif int(len(s))>3:\n",
    "    sh=s[:2];st=s[-2:]\n",
    "    print(sh+st)\n",
    "else:\n",
    "    print(s)    "
   ]
"""


